import request from "@/utils/functions/request";

// 查看已添加的菜单
export function ledgerMenuTabApi(params: any): Promise<any> {
  return request({
    url: "/cdledger/ledger-menu-do/ledgerMenuTab",
    method: "get",
    params
  });
}

// 根据菜单 id 查询字段
export function ledgerMenuTableFieldListApi(params: any): Promise<any> {
  return request({
    url: "/cdledger/ledger-menu-do/ledgerMenuTableFieldList",
    method: "get",
    params
  });
}

// 获取用户列表
export function userListApi(): Promise<any> {
  return request({
    url: "/cdledger/ledger-menu-do/userList",
    method: "get"
  });
}

// 修改菜单
export function ledgerMenuFormApi(data: any): Promise<any> {
  return request({
    url: "/cdledger/ledger-menu-do/ledgerMenuForm",
    method: "post",
    data
  });
}

// 级别列表
export function ledgerFieldSelectTabApi(query: any): Promise<any> {
  return request({
    url: "/cdledger/ledger-field-select-do/ledgerFieldSelectTab",
    method: "get",
    params: query,
  });
}